{
    "targets": [{
        # 全局唯一目标文件名称，编译生成 miahx_wrapper_nodejs.node
        "target_name": "miahx_wrapper_nodejs",
        # C++ 源文件
        "sources": [
            "../miahx_fastdds_types/",
            "./src/index.cpp"
        ],
        # C++ 头文件
        "include_dirs": [
            "<!@(node -p \"require('node-addon-api').include\")",
            "../../build/include",
        ],
        "dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"],
        "cflags!": ["-fno-exceptions"],
        "cflags_cc!": ["-fno-exceptions"],
        # 静态库
        "library_dirs": ["../../build/lib"],
        "libraries": ["miahx_fastdds_api.lib"],
        "msvs_settings": {
            "VCCLCompilerTool": {"ExceptionHandling": 1},
        },
        # 预编译宏，禁用 Node-API 的 C++ 异常处理和 node-addon-api 废弃的 API
        "defines": ["NAPI_DISABLE_CPP_EXCEPTIONS", "NODE_ADDON_API_DISABLE_DEPRECATED"]
    }]
}